package com.blueheart.bean;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.Map;

@Mapper(componentModel = "spring")
public interface ProductConvert{

    ProductConvert INSTANCE = Mappers.getMapper(ProductConvert.class);

    default Map<String, Object> updateCommonProduct(ProductBO productBO,CommonProduct commonProduct){
        Map<String, Object> details = commonProduct.getDetails();
        details.put("name", productBO.getName());
        details.put("category", productBO.getCategory());
        return details;
    }

}
